package com.yqg.education.mapper;

import com.yqg.education.controller.dto.TrainClassDTO;
import com.yqg.education.entity.TrainClass;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 张芸博
 * @since 2025-04-10
 */
@Mapper
public interface TrainClassMapper extends BaseMapper<TrainClass> {
//    模糊查询
    List<TrainClass> LikeSelect(@Param("pageNum") Integer pageNum,@Param("pageSize") Integer pageSize ,@Param("trainClassNum") String trainClassNum);
    Long findCount(String trainClassNum);

    Long getActiveClassCount();

    Long getClassCount();

    @MapKey("train_class_num")
    List<Map<String, Object>> getActiveClassAndStudent();


}
